package com.easy.query.console.dto;


import com.easy.query.console.entity.proxy.SysUserProxy;
import com.easy.query.core.annotation.NavigateFlat;
import com.easy.query.core.annotation.NavigateJoin;
import com.easy.query.core.expression.parser.core.available.MappingPath;
import lombok.Data;
import com.easy.query.core.annotation.Column;
import com.easy.query.core.annotation.Navigate;
import com.easy.query.core.enums.RelationTypeEnum;

import java.time.LocalDateTime;

import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * this file automatically generated by easy-query struct dto mapping
 * 当前文件是easy-query自动生成的 结构化dto 映射
 * {@link com.easy.query.console.entity.SysUser }
 *
 * @author xuejiaming
 * @easy-query-dto schema: normal
 */
@Data
public class SysUserDTO {


    /**
     * 用户id
     */
    @Column(dbType = "varchar(32)", comment = "用户id")
    private String id;
    /**
     * 用户姓名
     */
    @Column(comment = "用户姓名")
    private String name;
    /**
     * 用户出生日期
     */
    @Column(comment = "用户出生日期")
    private LocalDateTime birthday;
    /**
     * 用户所属企业id
     */
    @Column(comment = "用户所属企业id")
    private String companyId;


    private static final MappingPath COMPANY_NAME_PATH = SysUserProxy.TABLE.company().name();
//    @NavigateFlat(pathAlias = "COMPANY_NAME_PATH")
    @NavigateJoin(pathAlias = "COMPANY_NAME_PATH")
    private String companyName;

//    /**
//     * 用户所属企业
//     */
//    @Navigate(value = RelationTypeEnum.ManyToOne)
//    private InternalCompany company;
//
//
//    /**
//     * {@link com.easy.query.console.entity.Company }
//     */
//    @Data
//    public static class InternalCompany {
//        /**
//         * 企业名称
//         */
//        @Column(nullable = false, comment = "企业名称")
//        private String name;
//
//
//    }

}
